package com.lhy.service.impl;

import com.lhy.entity.Student;
import com.lhy.mapper.StudentMapper;
import com.lhy.service.IStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 学生表 服务实现类
 * </p>
 *
 * @author jobob
 * @since 2021-03-09
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {
    @Resource
    StudentMapper studentMapper;

    @Override
    public int updateStudnetName(String name, Integer studnetNo) {
        return studentMapper.updateStudnetName(name, studnetNo);
    }

    @Override
    public List<Student> findAll() {
        return studentMapper.selectList(null);
    }
}
